﻿<?php
header('Content-type:text/html;charset=utf-8');
date_default_timezone_set('PRC');
$date= include './mdb.php';
// var_dump($date);
 ?>




<!DOCTYPE html>
<!--[if IE 6]>
<html id="ie6" dir="ltr" lang="en-US">
<![endif]-->
<!--[if IE 7]>
<html id="ie7" dir="ltr" lang="en-US">
<![endif]-->
<!--[if IE 8]>
<html id="ie8" dir="ltr" lang="en-US">
<![endif]-->
<!--[if !(IE 6) | !(IE 7) | !(IE 8)  ]><!-->
<html dir="ltr" lang="en-US">
<!--<![endif]-->
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<title>留言薄</title>
<meta name="keywords" content="" />
<meta name="description" content=" " />
<link rel="stylesheet" type="text/css" media="all" href="images/css/style.css" />
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<!-- <link rel="stylesheet" type="text/css" href="css/index.css" /> -->
<!-- <script type="text/javascript" src='js/jquery-1.7.2.min.js'></script> -->

<!--[if lt IE 9]>
<script src="images/js/html5.js" type="text/javascript"></script>
<![endif]-->

</head>

<body class="home page page-id-2 page-template-default single-author singular two-column right-sidebar">
<!-- 背景图 -->
<div class="bg_left_top"></div>
<div class="bg_right_top"></div>
<div class="ship"></div>
<div class="clip"></div>
<div class="coff"></div>
<div class="compass"></div>
<div class="rule"></div>
<div class="search"></div>
<div class="book"></div>
<div class="pages"><li class="last"></li><li class="next"></li></div>
<script type="text/javascript">
$('.book').hover(function() {
  $('.book').css('backgrond','url(book_hover.png) no-repeat');
  $('.book').html('写留言');
}, function() {
   $('.book').html('');
});
$('.book').click(function() {
  window.location.href='post.php';
});
// 上一页 下一页
var pageNum =0;
$('.pages .last').click(function() {
  // http://localhost/0423/0429/html5/liuyanben.php#3  截取#好之后数字
  thisurl = Number(document.URL.substr(47));
    // thisurl = document.location.href;
    // thisurl = self.location.href;
    // thisurl = document.location;
    // thisurl = top.location.href;
    // thisurl = top.location.hostname;  //返回域名网址
  // alert(thisurl.substr('#'));
  thisurl+=3;
  window.location.href='liuyanben.php#'+thisurl;

});
$('.pages .next').click(function() {
    thisurl = Number(document.URL.substr(47));
  thisurl-=3;
  window.location.href='liuyanben.php#'+thisurl;

});


</script>
<!-- 背景图结束 -->
<div id="page" class="hfeed"> 
  <!-- #branding -->
  
  <div id="mpc-styles-switcher"> 
    <!-- <img src="images/bg/logo.jpg"/> --> 
    
    <!-- end ss-content --> 
  </div>
  <!-- end mpc-styles-switcher -->
  
  <div id="main">
    <div id="primary">
      <div id="content" role="main">
        <article id="post-2" class="post-2 page type-page status-publish hentry">
          <div class="entry-content">
            <div id="flipbook-container-0" class="flipbook-container">
              <div id="flipbook-0" class="flipbook">
                <div class="fb-page single">
                  <div class="page-content">
                    <div class="container">
                      <div class="page-html"></div>
                      <img src="images/001/cover.jpg" class="bg-img"/></div>
                  </div>
                </div>
<!-- 编辑开始 -->
<?php foreach($date as $k => $v): ?>
<div class="fb-page double">
  <div class="page-content">
    <div class="container">
      <div class="page-html">
        <div class="preview-content left toc">
         <!--  left  content -->
          <div id="left">
              <div class="edit data_top">
              <li class="titbg weather"><?php echo $v['time'] ?></li>  <li class="titbg weather"><?php echo $v['weather'] ?></li>
            </div>
            <!-- 用户图像 -->
            <div class="userpic">
              <img src="images/userico/<?php echo $v['userpicchose'] ?>" alt="">
            </div>
            <!-- 用户信息 -->
            <div class="userinfo">
              <ul>
                <li class="tit">昵称：</li><li><?php echo $v['user'] ?></li>
                 <li  class="tit">QQ：</li><li><?php echo $v['qq'] ?></li>
                  <li  class="tit">邮箱：</li><li><?php echo $v['email'] ?></li>
                  <li  class="tit">地址：</li><li><?php echo $v['addess'] ?></li>
                 <li  class="tit">时间：</li><li class="time"><?php echo $v['time'] ?></li>
              </ul>
            </div>
          </div>
          <script type="text/javascript">
          function del($k){
          var confirm = window.confirm("确认删除么？");
          if(confirm){
            window.location.href='./del.php?id='+$k;
          }
          }
          function edit($k){
            window.location.href='./edit.php?id='+$k;
          }
          </script>         
         <!-- left content end -->
        </div>
        <div class="preview-content right toc">
        <!-- right content -->
          
        <div id="right">
                  <div class="edit">
            <li class="titbg"><a href="javascript:edit(<?php echo $k ?>)" >编辑</a><a href="javascript:del(<?php echo $k ?>)">删除</a><a href="./post.php">添加</a></li>
          </div>
          <!-- 留言信息 -->
          <div class="message">
            <ul>
                <li  class="tit titbg">留言信息：</li>
              <li class="msgcon">
              <?php echo $v['msgcon'] ?>
              </li>
                <li  class="tit titbg">个性签名：</li>
              <li class="sign">
               <?php echo $v['sign'] ?>
              </li>
            </ul>
          </div>
        </div>
        <!-- right content  end-->       
        </div>
      </div>
      <img src="images/userico/<?php echo $v['bgchose'] ?>" class="bg-img"/></div>
  </div>
</div>
  <?php endforeach ?>
<!-- 编辑结束 -->
               
              
     
                <div class="fb-page single">
                  <div class="page-content">
                    <div class="container">
                      <div class="page-html"></div>
                      <img src="images/001/back-cover.jpg" class="bg-img"/></div>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <!-- .entry-content -->
          <footer class="entry-meta"> </footer>
          <!-- .entry-meta --> 
        </article>
        <!-- #post-2 --> 
        
      </div>
      <!-- #content --> 
    </div>
    <!-- #primary --> 
    
  </div>
  <!-- #main --> 
  
  <!-- #colophon --> 
</div>
<!-- #page -->

<script type='text/javascript' src='images/js/jquery.js?ver=1.7.2'></script> 
<script type='text/javascript' src='images/js/jquery.easing.1.3.js?ver=3.4.1'></script> 
<script type='text/javascript' src='images/js/jquery.doubletap.js?ver=3.4.1'></script> 
<script type='text/javascript' src='images/js/page-js.js?ver=3.4.1'></script> 
<script type='text/javascript' src='images/js/jquery.color.js?ver=2.0-4561m'></script> 
<script type='text/javascript' src='images/js/turn.js?ver=3.4.1'></script> 
<script type='text/javascript' src='images/js/flipbook.js?ver=3.4.1'></script>
</body>
</html>